<?php

namespace App\Models\Orm;


use App\Models\AbsBaseModel;


/**
 *
 * Area
 */
class CoinDrawLog extends AbsBaseModel
{


    public $timestamps = false;
    public $incrementing = false;

    /**
     *
     *  设置表名
     */
    const TABLE_NAME = 'coin_draw_log';
    const PRIMARY_KEY = 'id';

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = self::TABLE_NAME;
    //主键id
    protected $primaryKey = self::PRIMARY_KEY;
    //查询字段
    protected $visible = [];
    //加黑名单
    protected $guarded = [];

    const FEE = 0.05;


    const IGNORE = 0;//申请存币
    const APPLY = 1;//申请存币
    const PASS = 2;//通过收到币
    const FAIL = 3;//拒绝没有收到币

    // 状态描述
    public static $status_text = [
        self::IGNORE => '取消订单',
        self::APPLY => '存币订单处理中',
        self::PASS => '存币成功',
        self::FAIL => '存币失败',
    ];

    /**
     * 获取当前记录动作描述
     * @param $action
     * @return string
     */
    public static function getActionText($status)
    {
        return self::$status_text[$status] ?: '';
    }

}
